<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('Message/index')}">留言管理</a></li>
			<!--<li><a href="{:url('Message/add')}">{:lang('ADMIN_TEAM_ADD')}</a></li>-->
		</ul>
        <form class="well form-inline margin-top-20" method="get" action="{:url('Message/index')}">
            用户名:
            <input type="text" class="form-control" name="user_name" style="width: 120px;" value="{:input('request.user_name/s','')}" placeholder="请输入{:lang('USERNAME')}">           
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:url('Message/index')}">清空</a>
        </form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>标题</th>
					<th>姓名</th>
					<th>电话</th>
					<th>邮箱</th>
					<th>地址</th>
					<th>内容</th>
                    <th>创建时间</th>
					<th width="140">{:lang('ACTIONS')}</th>
				</tr>
			</thead>
			<tbody>
				
				<foreach name="users" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{$vo.title}</td>
					<td width="120">{$vo.username}</td>
					<td width="120">{$vo.mobile}</td>
					<td width="120">{$vo.email}</td>
					<td>{$vo.address}</td>
                    <td>{$vo.content}</td>
					<td width="120">
                       {:date('Y-m-d H:i:s',$vo['create_time'])}
					</td>

					<td>
						<if condition="1 eq 1 || $vo['id'] eq cmf_get_current_admin_id()">
							<span class="btn btn-xs btn-primary disabled">{:lang('EDIT')}</span>
							<a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('message/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
							
						<else />
							<a class="btn btn-xs btn-primary" href='{:url("message/edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>
							<a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('message/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
							
						</if>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>